<!DOCTYPE html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link href='./static/css/basic.css' rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="./static/js/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" src="./static/js/common.js"></script>
    <style type="text/css">
        .header-middle {
            background-color: #fff;
        }
    </style>
</head>
<body>
<div class='header'>
    <div class="header-content display_flex space_between align_center">
        <div class="logo-wrapper">
            <img class="logo" src="./static/images/logo.png" alt="logo">
        </div>
        <div class="header-nav display_flex space_between">
            <span data-href="index">首页</span>
            <span data-href="production">产品与服务</span>
            <span data-href="solution">解决方案</span>
            <span data-href="dynamicInfo">资讯动态</span>
            <span data-href="aboutUs">关于大包</span>
            <span data-href="contactUs">联系我们</span>
        </div>
    </div>
</div>
<script>
    // 初始化iframe高度
    function resetIframeHeight() {
        var height = $("body").height();
        parent.document.getElementById("headerBox").height = height;
    }

    resetIframeHeight()

    $(".logo-wrapper").click(function () {
        parent.document.location.href = './index.html';
    })

    $(".header-nav span").each(function () { // 添加active类名
        var href = $(this).data('href');
        var location = parent.document.location.href;
        if (location.indexOf(href) > -1) {
            $(this).addClass('active')
        }
    })

    $(".header-nav span").click(function () { // 跳转
        parent.document.location.href = './' + $(this).data('href') + '.html';
    })
</script>
</body>
</html>
